package com.bfly.mall.advert.dto;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠卷表单DTO
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 20:48
 */
public class CouponFormDTO implements Serializable {

    private static final long serialVersionUID = 5500998483902919800L;
    private int id;
    @NotBlank(message = "名称不能为空!")
    private String name;

    private int type;
    private String remark;

    @Min(message = "优惠卷数量最小为0", value = 0)
    private int total;

    private int remaining;

    @Min(message = "每人限领数量最小为0", value = 0)
    private int limitNum;

    @Min(message = "优惠金额最小为0", value = 0)
    @NotNull(message = "优惠金额不能为空!")
    private BigDecimal discount;

    @Min(message = "最低消费最小为0", value = 0)
    @NotNull(message = "最低消费不能为空")
    private BigDecimal minimums;

    @Min(message = "领卷后有效天数最小为1", value = 1)
    private int days;

    @NotNull(message = "优惠卷活动开始时间不能为空!")
    private Date activityStart;

    @NotNull(message = "优惠卷活动结束时间不能为空!")
    private Date activityEnd;

    @NotNull(message = "优惠卷使用范围不能为空")
    private Integer[] rangeId;

    private int useRange;

    public int getUseRange() {
        return useRange;
    }

    public void setUseRange(int useRange) {
        this.useRange = useRange;
    }

    public Integer[] getRangeId() {
        return rangeId;
    }

    public void setRangeId(Integer[] rangeId) {
        this.rangeId = rangeId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getRemaining() {
        return remaining;
    }

    public void setRemaining(int remaining) {
        this.remaining = remaining;
    }

    public int getLimitNum() {
        return limitNum;
    }

    public void setLimitNum(int limitNum) {
        this.limitNum = limitNum;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public BigDecimal getMinimums() {
        return minimums;
    }

    public void setMinimums(BigDecimal minimums) {
        this.minimums = minimums;
    }

    public int getDays() {
        return days;
    }

    public void setDays(int days) {
        this.days = days;
    }

    public Date getActivityStart() {
        return activityStart;
    }

    public void setActivityStart(Date activityStart) {
        this.activityStart = activityStart;
    }

    public Date getActivityEnd() {
        return activityEnd;
    }

    public void setActivityEnd(Date activityEnd) {
        this.activityEnd = activityEnd;
    }
}
